<%-- 
    Document   : purchaseDetailForm
    Created on : 07/04/2009, 05:56:04 PM
    Author     : Joel Chuca
--%>

<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="packageDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='packageDetail.heading'/>"/>
    <meta name="menu" content="RolePurchaser"/>

    <script type="text/javascript" src="<c:url value='/scripts/wz_tooltip.js'/>"></script>

    <script type="text/javascript">
        window.onload = function xx() {}
        function TooltipTxt(id) {
            var txt = getText("tooltip.tooltip");
            return txt;
        }

    </script>
</head>

<table>
    <tr>
        <td><s:form id="packageDetailForm" name="packageDetailForm" action="savePackageDetail" method="post" validate="true">
                <s:hidden key="packageDetail.id" cssClass="text medium"/>
                <s:hidden key="tooltip.tooltip" id="tooltip" cssClass="text medium"/>
                <s:textfield key="code" required="true" cssClass="text medium" readonly="true" onmouseover="Tip(TooltipTxt('tooltip'))" onmouseout="UnTip()"/>
                <s:select list="names" name="packageDetail.packageName" listKey="value" listValue="label" />
                <li>
                    <s:textfield key="packageDetail.quantity" required="true" cssClass="text medium"/>
                    <s:textfield key="material.unitMeasure.name" required="true" cssClass="text medium" disabled="true"/>
                </li>

                <li class="buttonBar bottom">
                    <s:submit cssClass="button" method="save" key="button.save" theme="simple"/>
                    <c:if test="${not empty purchaseDetail.id}">
                        <s:submit cssClass="button" method="delete" key="button.delete" onclick="return confirmDelete('packageDetail')" theme="simple"/>
                    </c:if>
                    <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
                </li>
        </s:form></td>
        <td><br><fmt:message key="purchaseDetail"/># ${idp}<br>
            <fmt:message key="supplier.fullName"/>: ${ps}<br>
            <fmt:message key="purchase.date"/>: ${pd}<br>
            <fmt:message key="purchase.totalPrice"/>: ${ptp}<br>
            <fmt:message key="purchase.detailMaterial"/>: ${pm}<br>
            <fmt:message key="numberOfPackages"/>: ${pnp}<br>
        </td>
    </tr>

</table>
<script type="text/javascript">
    //Form.focusFirstElement($("purchaseDetailForm"));
</script>